Skip to content

Conversation

@justonedev1
Copy link
Collaborator

[Framework] classes inherited from Reductor are now configurable

  • field reductorParameters inside of dataSources is used
  • internally we use CustomParameters so json config has same format as extendedTaskParameters

- field reductorParameters inside of dataSources is used
- internally we use CustomParameters so json config has same format as
extendedTaskParameters
Copy link
Collaborator

@knopers8 knopers8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

#include "QualityControl/ConditionAccess.h"
#include <TH1I.h>
#include <TTree.h>
#include <boost/test/tools/old/interface.hpp>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwanted header added automatically?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justonedev1 please fix it when you are back.

Comment on lines +55 to +73
// https://stackoverflow.com/questions/424104/can-i-access-private-members-from-outside-the-class-without-using-friends
template <typename Accessor, typename Accessor::type Member>
struct DeclareGlobalGet {
friend typename Accessor::type get(Accessor) { return Member; }
};

struct TrendingTaskReductorAccessor {
using type = std::unordered_map<std::string, std::unique_ptr<Reductor>> TrendingTask::*;
friend type get(TrendingTaskReductorAccessor);
};

struct ReductorConfigAccessor {
using type = CustomParameters Reductor::*;
friend type get(ReductorConfigAccessor);
};

template struct DeclareGlobalGet<TrendingTaskReductorAccessor, &TrendingTask::mReductors>;
template struct DeclareGlobalGet<ReductorConfigAccessor, &Reductor::mCustomParameters>;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to admit, I spent 2 hours trying to understand it and I did not manage. Not saying that the solution is bad though, but I need some learning.

@Barthelemy Barthelemy merged commit a998e12 into master Mar 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants